﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlReportSoDoPhanCapTDV.ascx.cs" Inherits="UserControl_ControlReportSoDoPhanCapTDV" %>

<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<%@ Register assembly="DevExpress.Web.ASPxTreeList.v9.2.Export" namespace="DevExpress.Web.ASPxTreeList.Export" tagprefix="dxwtl" %>
<%@ Register assembly="DevExpress.Web.ASPxTreeList.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxTreeList" tagprefix="dxwtl" %>

<%@ Register assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dxpc" %>


<script type="text/javascript">
    function pageLoad() {



        $("#<%= imgBtnAdd.ClientID %>").click(function () {

            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });

        });
        $("#<%= imgBtnSave.ClientID %>").click(function () {
            $.blockUI({
                message: '<h1>Xin vui lòng chờ xử lý</h1>',
                css: {
                    border: 'none',
                    padding: '15px',
                    backgroundColor: '#f00',
                    opacity: .5,
                    color: '#fff'
                }
            });
            setTimeout($.unblockUI, 5000);
        });


        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        function EndRequestHandler(sender, args) {
            $.unblockUI();
        }

    }

</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="imgBtnSave" />

</Triggers>
    <ContentTemplate>
    
                <div class="direct_container_right_titletop direct_colleft">
                    Báo cáo sơ đồ phân cấp TDV
                </div>
                
                <!-- Button chuc nang-->
                <div class="direct_menu_report_page direct_colleft">
                
                  
                    <asp:ImageButton ID="imgBtnAdd" CausesValidation="false" onclick="imgBtnAdd_Click" ToolTip="Lấy dữ liệu"  ImageUrl="~/Images/Document.png" Width="32px" Height="32px" runat="server" />
                    <asp:ImageButton ID="imgBtnSave" onclick="imgBtnSave_Click" CausesValidation="false" ToolTip="Xuất ra file excel dạng thường" ImageUrl="~/Images/download.png" Width="32px" Height="32px" runat="server" />
                    
                </div>
                <!-- End Button chuc nang-->
                <div class="clear"></div>
                 <hr />

                
                   <table>
                   
                    <tr>
                    <td>
                      <dxwtl:ASPxTreeList ID="ASPxTreeList1" runat="server"
             KeyFieldName="Salesp_Key" 
            ParentFieldName="Recommender" AutoGenerateColumns="false">
            
          
           
            <Columns>
               <dxwtl:TreeListTextColumn Caption="Mã TDV" FieldName="salesp_key" 
                    VisibleIndex="0">
                </dxwtl:TreeListTextColumn>
                 <dxwtl:TreeListTextColumn Caption="Họ tên TDV" FieldName="salesp_name" 
                    VisibleIndex="1">
                </dxwtl:TreeListTextColumn>
                
                
                 <dxwtl:TreeListTextColumn Caption="Cấp bậc" FieldName="CapBac" 
                    VisibleIndex="2">
                </dxwtl:TreeListTextColumn>
                 <dxwtl:TreeListTextColumn Caption="Trạng thái" FieldName="Active" 
                    VisibleIndex="3">
                </dxwtl:TreeListTextColumn>
                <dxwtl:TreeListCheckColumn Caption="Trình dược viên ảo" FieldName="isVirtual" VisibleIndex="4"></dxwtl:TreeListCheckColumn>
                 
                </Columns>
                
             </dxwtl:ASPxTreeList>
              <dxwtl:ASPxTreeListExporter TreeListID="ASPxTreeList1" ID="ASPxTreeListExporter1" runat="server">
        </dxwtl:ASPxTreeListExporter>
                    </td>
                    </tr>
                 </table>
                              
             <dxpc:ASPxPopupControl ID="MessageBox" PopupHorizontalAlign="WindowCenter"  PopupVerticalAlign="WindowCenter" Font-Bold="true" HeaderText="DRM-S" runat="server" Height="91px" 
        Width="601px">
        <ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True"></dxpc:PopupControlContentControl>
</ContentCollection>
    </dxpc:ASPxPopupControl>
    </ContentTemplate>
</asp:UpdatePanel>